import React from "react";
import Chartsmodule from "./chartModule";
function Flexbox({ area, showEchart = true, showChildren = true, children = null, showLegend, margin, style, useXis = false, pieType = "1", showTitle = true, showBtn = true, title = "数据", state, showAdBar, showPie = true, showBar = true, showLine = true, defaultModule }) {
    return (
        <>
            <div className="flex-box" style={style}>
                <div className="flex-box-container">
                    <div className="flex-box-center">
                        {showEchart ? <Chartsmodule
                            showLegend={showLegend}
                            margin={margin}
                            useXis={useXis}
                            pieType={pieType}
                            showTitle={showTitle}
                            showBtn={showBtn}
                            title={title}
                            state={state}
                            showPie={showPie}
                            showBar={showBar}
                            showLine={showLine}
                            defaultModule={defaultModule}
                            showAdBar={showAdBar}
                            area={area}
                        /> : null}
                        {showChildren ? children : null}
                    </div>
                </div>
            </div>
        </>
    )
}
export default Flexbox;